﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Configuration;

namespace FSViet.Survey
{
	public class GlobalApplication
	{
		public static ConnectionStringSettings ConnectionStringSetting
		{
			get {
				return ConfigurationManager.ConnectionStrings["FSViet.Survey"];
			}
		}

		public static DateTime Now
		{ get { return DateTime.Now; } }

		public static string NowS
		{ get { return Now.ToString("yyyy/MM/dd hh:mm:ss tt"); } }

		public static string GuidS
		{ get { return GetGuidS(Guid.NewGuid()); } }

		public static string GetGuidS(Guid guid)
		{ return guid.ToString("N").ToUpper(); }

		public static Guid GetGuid(string guidS)
		{
			Guid result = Guid.Empty;
			try
			{
				result = new Guid(guidS);
			}
			catch
			{
			}
			return result; }

		public static DateTime GetDateTime(string dateTimeS)
		{ return Convert.ToDateTime(dateTimeS); }

		public static bool IsValidRequest()
		{ return true; }

		public static int ItemPerPage
		{ get { return 10; } }
	}
}